/**
 * Created by ibm on 2015/8/29.
 */
if(dev) {
    console.info('加载', 'news/template.js');
}
var source=
    '<%for( i = 0; i < dataArray.length; i++) {%>'+
        '<div class="newsItem">'+
        '<a class="close" id="regclose" ' +
        'href="javascript:void(0);" data="<%=dataArray[i].id%>" onclick="deleteNews(this);"'+
        'style="float: right;margin-right: 10px;margin-top: -30px;cursor: pointer;">'+
        '<img src="static/images/cancel.png" alt="关闭"/>'+
        '</a>'+
        '<div class="replyinfo">'+

            '<%if(dataArray[i].account.avatarUrl!=null){%>'+
                '<img src="researcher/<%=dataArray[i].account.avatarUrl%>" class="pic-big fl">'+
            '<%}else{%>'+
                '<img src="../static/images/photo2.png" class="pic-big fl">'+
            '<%}%>'+
            '<div class="fl reply-name-time">'+
                '<p class="replyname"><%=dataArray[i].account.firstName%><span class="repplyed">Reply</span></p>'+
                '<p class="replytime" id="one_replytime<%=dataArray[i].id%>"><script type="text/javascript">$.PIF_dateDiffFormat.getDateDiff("<%=dataArray[i].updateTime%>","one_replytime<%=dataArray[i].id%>")</script></p>'+
            '</div>'+
            //'<a href="#" class="replybtn">Reply</a>'+
        '</div>'+
        '<div class="thesisInfo">'+
            '<p class="title">'+
                '<a href="javascript:void(0);" onclick="detail(<%=dataArray[i].paper.id%>);"><%=dataArray[i].paper.title%></a>'+
            '</p>'+
            '<p class="author">'+
                '<%if(dataArray[i].paper.authors!=null){%>'+
                    '<%for( j=0;j<dataArray[i].paper.authors.length;j++){%>'+
                        '<span><a href="javascript:void(0);" onclick="authorsPapers(\'<%=dataArray[i].paper.authors[j]%>\');"><%=dataArray[i].paper.authors[j]%></a></span>' +
                            '<%if(j!=(dataArray[i].paper.authors.length-1)){%>'+
                                '<em>·</em>'+
                            '<%}%>'+
                    '<%}%>'+
                '<%}%>'+
            '</p>'+
        '</div>'+
        '<%if(dataArray[i].preAccount!=null){%>'+
            '<div class="reply-floor1">'+
                '<%if(dataArray[i].preAccount.avatarUrl!=null){%>'+
                    '<img src="researcher/<%=dataArray[i].preAccount.avatarUrl%>" class="pic-small fl">'+
                '<%}else{%>'+
                    '<img src="../static/images/photo2.png" class="pic-small fl">'+
                '<%}%>'+

                    '<div class="fl reply-name-time">'+
                        '<p class="replyname"><%=dataArray[i].preAccount.firstName%></p>'+
                        '<p class="replytime" id="two_replytime<%=dataArray[i].preComment.id%>"><script type="text/javascript">$.PIF_dateDiffFormat.getDateDiff("<%=dataArray[i].preComment.updateTime%>","two_replytime<%=dataArray[i].id%>")</script></p>'+
                    '</div>'+
                    '<div class="reply-floor1-content">'+
                        ':&nbsp;&nbsp;<%=dataArray[i].preComment.content%>'+
                    '</div>'+
            '</div>'+
            '<div class="reply-floor2">'+
                    '<%if(dataArray[i].account.avatarUrl!=null){%>'+
                        '<img src="researcher/<%=dataArray[i].account.avatarUrl%>" class="pic-small fl">'+
                    '<%}else{%>'+
                        '<img src="../static/images/photo2.png" class="pic-small fl">'+
                    '<%}%>'+


                    '<div class="fl reply-name-time">'+
                        '<p class="replyname"><%=dataArray[i].account.firstName%></p>'+
                        '<p class="replytime" id="three_replytime<%=dataArray[i].id%>"><script type="text/javascript">$.PIF_dateDiffFormat.getDateDiff("<%=dataArray[i].updateTime%>","three_replytime<%=dataArray[i].id%>")</script></p>'+
                    '</div>'+
                    '<div class="reply-floor2-content">'+
                        'Reply:&nbsp;&nbsp;<%=dataArray[i].content%>'+
                    '</div>'+
                    '<textarea class="reply-textarea" placeholder="Reply <%=dataArray[i].account.firstName%> :"></textarea>'+
                    '<a href="javascript:void(0);" data="<%=dataArray[i].paper.id%>-<%=dataArray[i].id%>" class="sendbtn">Send</a>'+
            '</div>'+
        '<%}else{%>'+
            '<div class="reply-floor1">'+
                    '<%if(dataArray[i].account.avatarUrl!=null){%>'+
                    '<img src="researcher/<%=dataArray[i].account.avatarUrl%>" class="pic-small fl">'+
                    '<%}else{%>'+
                        '<img src="../static/images/photo2.png" class="pic-small fl">'+
                    '<%}%>'+

                    '<div class="fl reply-name-time">'+
                        '<p class="replyname"><%=dataArray[i].account.firstName%></p>'+
                        '<p class="replytime" id="two_replytime<%=dataArray[i].id%>"><script type="text/javascript">$.PIF_dateDiffFormat.getDateDiff("<%=dataArray[i].updateTime%>","two_replytime<%=dataArray[i].id%>")</script></p>'+
                    '</div>'+
                    '<div class="reply-floor1-content">'+
                        ':&nbsp;&nbsp;<%=dataArray[i].content%>'+
                    '</div>'+
                    '<textarea class="reply-textarea" placeholder="Reply <%=dataArray[i].account.firstName%> :"></textarea>'+
                    '<a href="javascript:void(0);" data="<%=dataArray[i].paper.id%>-<%=dataArray[i].id%>" class="sendbtn">Send</a>'+
            '</div>'+
        '<%}%>'+
        '</div>'+
    '<%}%>';